﻿namespace Blaze.UI
{
    using UnityEngine;

    [RequireComponent(typeof(Animator))]
    public class ForceUpdateAnimator : MonoBehaviour
    {
        private bool isInit = false;
        private void OnEnable()
        {
            if (!isInit)
            {
                return;
            }
            GetComponent<Animator>().Update(0);
        }

        private void Start()
        {
            if (!isInit)
            {
                GetComponent<Animator>().Update(0);
                isInit = true;
            }
        }
    }
}